import { defineStore } from "pinia";
import { getHouseInfos } from "../../services/modules/detailRequest";
// city 数据管理
export default defineStore("detail", {
    // 数据
    state: () => ({
        mainPart: {},
        pricePart: {},
        currentHouse: {}
    }),
    // 操作
    actions: {
        async fetchHouseInfosData(houseId) {
            // this.Vue.nextTick({

            // })
            const res = await getHouseInfos(houseId)
            this.mainPart = res.data.mainPart;
            this.pricePart = res.data.pricePart;
            this.currentHouse = res.data.currentHouse;
        }
    }
})